@extends('layouts.empty')

@section('content')
<div class="order-panel_print">
    <div class="order-panel__header_print">
      <img src="http://nihaocai.oss-cn-hangzhou.aliyuncs.com/userstmp/m5iOKUwxETU5TagE57qxe6WOoX68dITeh0MkHKgR.png">
    </div>
    <div class="order-panel__customer-info_print">
      <div class="customer-info__left">
        <div class="name">{{$order->address->name}}</div>
        <div class="tel">{{$order->address->phone}}</div>
        <div class="address">{{$order->address->address}}</div>
        <div class="time">
          @if($order->shipping_at)
            {!! substr($order->shipping_at,0,16) !!} - {!! substr($order->shipping_end_at,11,5) !!}
          @else
            {!! $order->will_take==1?'自提':'' !!}
          @endif
        </div>
      </div>
      <div class="customer-info__right">
        <div class="qrcode"></div>
      </div>
    </div>
    <div class="order-panel__order-info_print">
    <div class="title">订单概述</div>
    <ul class="order-info">
      <li>及时处理：
      @foreach($order->goods as $k=>$v)
        @if($v->is_timely_sort==1)
        {{ $goods_arr[$v->goods_id]->name }} {{ $goods_arr[$v->goods_id]->title }}*{{ $v->number }}
        @endif
      @endforeach
      </li>
      <li>金额：{{ $order->calculate_price }}元</li>
      <li>客户备注：
        <span>{{ $order->remark }}</span>
      </li>
    </ul>
  </div>
    <div class="order-panel__footer_print">
      <div>公司地址：柯桥区柯北大道788号金徕旺电子商务园1A</div>
      <div>客服电话：0575-85678813</div>
    </div>
  </div>
@endsection

@section('scripts')
    <script>
          $('.qrcode').qrcode({width: 144,height: 144,text: 'it is a test'});
    </script>
@endsection